namespace SharpTalk.Core.Services
{
    using System;
    using Interfaces;
    using System.Runtime.Serialization;

    [DataContract]
    [Serializable]
    public abstract class ResponseBase<TContent> 
        : IResponse<TContent>
    {
        /// <summary>
        /// Obtain or define the content of the response
        /// </summary>
        [DataMember]
        public virtual TContent Content { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public virtual ErrorDetails Error { get; set; }
        /// <summary>
        /// 
        /// </summary>
        [DataMember]
        public virtual bool HasError { get { return Error != null; } protected internal set {} }
    }
}